<?php

include "conecta.php";

$sender=$_GET["sender"];
$target=$_GET["target"];

$sqlCommand = "SELECT * FROM mensagem WHERE (_id_sender=".$sender." AND _id_target=".$target.") OR (_id_sender=".$target." AND _id_target=".$sender.")";
$query = mysqli_query($conect, $sqlCommand);
while ($row = mysqli_fetch_array($query)){
$texto = $row["texto"].";".$row["_id_sender"].";".$row["_id_target"].";";
echo $texto."<br/>";
}


?>


